Markdown escape
Put a backslash in front of every character Markdown would treat as formatting, so *x* becomes \*x\* and displays with its asterisks instead of as italics. Same text, same result, with nothing sent anywhere. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Text
- *x*
- Escaped
- \*x\*
Escape Markdown metacharacters so text renders literally. Search intent: escape markdown characters. No network calls, no random seeds, and no server state are required for a correct answer.
Why Markdown changes text you meant literally
Markdown reads certain characters as formatting instructions. A pair of asterisks around a word turns it into italics, and other characters start headings, lists, links or code. That is useful when you write Markdown on purpose, but it gets in the way when a piece of text has to appear exactly as it is, such as a name, a formula or a phrase that happens to contain those characters. Escaping solves it by placing a backslash before each special character, which tells Markdown to show the character instead of acting on it. In the example, *x* becomes \*x\*, and the reader sees *x* with its asterisks rather than an italic x.
What gets escaped and what you can count on
The tool covers the special characters of the CommonMark rules and the GFM extensions, both inside a line and at the start of a block. Everything else in your text stays exactly as you typed it. The work happens entirely in your browser without contacting any server, and it involves no randomness, so the same text always produces the same escaped result. Paste the output into your document and, once it is displayed, it reads literally, with no stray formatting.
How it works
Escape Markdown metacharacters so text renders literally. Backslash-escapes CommonMark/GFM specials used in inline and block markup. The implementation is pure JavaScript with no external services.
No network calls, no random seeds, and no server state are required for a correct answer. Failed jobs are not billed. Landings target the stated search intent with precise keywords.
Prefer explicit units and ranges over silent coercion of bad types. When a field is optional, defaults are documented in params and echoed in the output.
When to use it
Use this when your search intent matches the calculator name and you need a reproducible answer for teaching, finance ops, GIS, text tooling, or unit history work. Escape Markdown metacharacters so text renders literally. No network calls, no random seeds, and no server state are required for a correct answer.
Failed jobs are not billed. Landings target the stated search intent with precise keywords. Prefer explicit units and ranges over silent coercion of bad types.
When a field is optional, defaults are documented in params and
FAQ
Does it call the network?
No. All math and text transforms are local and deterministic.
When should I escape text before adding it to Markdown?
Whenever a piece of text must appear exactly as written inside a Markdown document, such as a name, a formula or a phrase that happens to contain asterisks or brackets. Escape it first, then paste it in.
Will the backslashes show up on the published page?
No. Markdown consumes them when it displays the text, so readers see the original characters. The backslashes only live in the source text, which is where they do their job.
Does it also handle characters at the start of a line, like headings or lists?
Yes. It escapes special characters inside a line as well as the ones that open a block, following CommonMark rules and the GFM extensions, so a line never turns into a heading or a list by accident.
Does the same text always give the same result?
Yes. There is no randomness and no stored state, so the same text produces exactly the same escaped version every time you run it.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/text/markdown-escape \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"*not bold*"}'const res = await fetch("https://api.kit.forhosting.com/text/markdown-escape", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "*not bold*"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/text/markdown-escape",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "*not bold*"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/text/markdown-escape", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"*not bold*"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"*not bold*"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/text/markdown-escape", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"text": "*not bold*"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "text.markdown_escape",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets, CMS hooks, automation, or teaching demos.
How it works
The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets, CMS hooks, automation, or teaching demos.
Inputs, limits and rounding
Optional decimals use half-up once. No network calls, no random seeds, and no server state are required for a correct answer. Failed jobs are not billed. Landings target the stated search intent with precise keywords. Prefer explicit units and ranges over silent coercion of bad types. When Provide the required parameters as JSON numbers or strings as documented. Invalid types, missing required fields, or out-of-range values raise invalid_input with a clear message. Outputs echo key inputs so automation can log the full context of each call. The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets, CMS hooks, automation, or teaching demos.
When to use it
The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets, CMS hooks, automation, or teaching demos.
Integration use cases
Quick check
Paste values in the free widget and compare with a spreadsheet.
Automation
Call the API with the same JSON contract from n8n, scripts, or CMS.
Teaching
Show the formula and pinned golden examples without proprietary software.
Technical questions
Is it free in the browser?
Yes. Tier A runs fully client-side with the same core as the API.
What happens on bad input?
The handler throws invalid_input; failed jobs are not billed.
Can I use it from the API?
Yes. Send the same JSON fields documented in params.
Who authors this?
Aspire (elon@forhosting.com), EN-only delivery; Nitro hydrates locales.