tools.maxhogan.dev

Escape / Unescape

JSON, HTML entity, regex, shell and URL escaping.

Input
What it does

Escapes or unescapes text for five common formats: JSON string literals, HTML entities, URL percent-encoding, regex metacharacters, and POSIX shell single-quoting. Handles the full round trip, including named, decimal, and hex HTML entities decoded without touching the DOM.

How to use it

Paste your text, pick a format, and choose Escape or Unescape. The result updates instantly and has its own copy button. Malformed input for JSON or URL unescaping raises a specific error instead of silently returning garbage.

Why this one

Most escaping tools online only handle one format and quietly mangle malformed input instead of telling you what is wrong. This one covers five formats in one place, runs entirely in your browser, and never sends your text anywhere.

FAQ
Does the HTML entity decoder use the browser DOM?
No. It uses a hand-rolled map of common named entities plus decimal (é) and hex (é) numeric entities, so it works the same in Node and in any browser.
What happens if I unescape invalid JSON or URL text?
You get a clear error explaining what is wrong (for example an unescaped quote in JSON or a stray % without two hex digits in a URL) instead of a mangled result.
How does shell escaping work?
It wraps your text in single quotes and replaces any single quote inside it with the standard POSIX '\'' sequence, so the result is safe to paste into a shell command as one literal argument.