JSONのエスケープ/アンエスケープ

Escape special characters in a string for safe JSON embedding, or unescape an escaped JSON string back to plain text.

Ad Space
Ad Space

How It Works

  1. Paste your string: Enter the text you want to escape — this could be raw text containing quotes, newlines, backslashes, or any special characters.
  2. Choose escape or unescape: Select whether you want to escape text for embedding in JSON, or unescape a JSON string back to readable text.
  3. Copy the result: The escaped or unescaped output appears instantly. Copy it for use in your code or data.

Why Use JSON String Escape?

JSON strings have strict escaping rules — double quotes must become \", newlines become \n, backslashes become \\, and tabs become \t. Failing to escape these characters correctly causes JSON parse errors that break APIs, configuration files, and data pipelines. This tool handles all escaping and unescaping automatically, eliminating manual find-and-replace and preventing subtle bugs from missed escape sequences.

Features

Frequently Asked Questions

What characters does JSON escaping handle?

JSON requires escaping: double quotes ("), backslash (\), forward slash (/), newline (\n), carriage return (\r), tab (\t), form feed (\f), backspace (\b), and Unicode characters above U+FFFF. This tool handles all of them.

Why is my JSON parse error caused by escaping?

Common causes include unescaped double quotes inside a string value, literal newlines inside a string (must be \n), and unescaped backslashes. Paste your broken string here to escape it correctly.

Does this include the surrounding quotes?

By default the tool escapes the content without wrapping quotes, so you can paste the result into your JSON string. Toggle the "Include quotes" option if you want the output wrapped in double quotes.

Related Tools

JSON Formatter JSON Tree Viewer JSON Path Extractor HTML Entity