Skip to main content
Z

Escape & Unescape — HTML, JSON, Java, SQL & CSV Strings

Escape and unescape strings for HTML, XML, Java, C#, JavaScript, JSON, CSV (RFC 4180), and SQL.

Free No signup Client-side Privacy friendly Updated

How to use

  1. 1 Pick the target language — each has its own escape rules.
  2. 2 Toggle Escape (text → literal) or Unescape (literal → text).
  3. 3 Paste your raw or escaped input. Output updates as you type.
  4. 4 Use Swap to flip input and output instantly.

Why use this tool

  • 8 languages — HTML, XML, Java, C#, JavaScript, JSON, CSV (RFC 4180), and SQL.
  • Per-language rule tables — Java forces ASCII-only \uXXXX, JSON uses native JSON.stringify, CSV follows RFC 4180.
  • JSON path uses the native parser — no edge cases hand-rolled.
  • Pure client-side. No upload, no analytics on your content.

Frequently asked questions

Why does Java force ASCII-only output?

Java source files are commonly ISO-8859-1 by default and editors / SCM diffs handle ASCII most safely. The Java escaper emits \uXXXX for any non-ASCII character; the C# and JavaScript ones keep Unicode characters as-is.

Does CSV escape every field?

It treats the entire input as a single field. If the field contains a comma, quote, or newline it wraps in quotes and doubles internal quotes (RFC 4180). For full-row CSV processing use a dedicated parser.

SQL: backslash or quote doubling?

The tool uses quote-doubling (''), which is portable across MySQL, PostgreSQL, SQLite, and SQL Server. Backslash escapes work only in MySQL and break on most other databases.

Related tools?

See HTML Entities Converter for named-entity tables and URL Encoder for percent-encoding.

What is Escape & Unescape?

An Escape & Unescape is a tool that escapes and unescapes strings for many languages and formats directly in the browser. It applies the escaping rules of HTML, XML, Java, C#, JavaScript, JSON, CSV (RFC 4180), and SQL so special characters can be safely embedded, and reverses each transformation to recover the original text.

Features

Escape & unescape

Two-way conversion for every supported language and format.

8 formats

HTML, XML, Java, C#, JavaScript, JSON, CSV, and SQL escaping rules.

100% private

Runs client-side — your strings never leave the browser.

Example

Input

Line "A"
C:\temp

Output

Line \"A\"\nC:\\temp

Common use cases

  1. 1

    Embed a string in code

    Escape quotes and newlines so a value drops safely into a Java, JS, or JSON literal.

  2. 2

    Prevent breakage in CSV/SQL

    Quote and escape values so they don't break a CSV column or SQL string (use parameters for real SQL safety).

  3. 3

    Recover raw text

    Unescape a copied literal back to its original characters.

Summary

Zerethon's escape/unescape tool applies (and reverses) the string-escaping rules of HTML, XML, Java, C#, JavaScript, JSON, CSV (RFC 4180), and SQL, in your browser. It makes special characters safe to embed in each format and decodes them back. Nothing is uploaded.

Category
Developer
Pricing
Free
Privacy
Browser-based
Signup
Not required

References

Privacy

Your data never leaves your browser unless explicitly stated. Escape & Unescape runs entirely client-side — no server upload, no logging, no tracking of your input.

Related tools

Build, share, and grow on Zerethon Social

Free signup. Earn points, collect achievements, and connect with creators worldwide.

Sign up free