Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Encode & decode toolbox

Encode, decode, escape and unescape text: Base64, URL, HTML entities, hex, code points, and string escapes for JSON, JavaScript, Python, Java, C, SQL and more.

How to use

  1. Choose the format: Base64, URL, HTML or XML entities, hex or binary bytes, code points, or the string escapes of JSON, JavaScript, Python, Java / C#, C / C++, regular expressions, CSV, SQL or the shell.
  2. Type or paste your text in the input box.
  3. Press Encode / escape to make it safe for that format, or Decode / unescape to turn it back into plain text. The result updates as you type.
  4. Use the result as input lets you go back the other way to check the round trip.

Keyboard and touch

TabMove between the format, the boxes and the buttons
Enter / SpacePress the focused button

Tips

  • Base64 is an encoding, not encryption: anyone can decode it. Use the Text & file encryptor to keep something secret.
  • For a value inside a web address (a search term, a file name), use URL encoding; spaces become %20 (or + in form data).
  • When putting user text into HTML, escape at least & < > and quotes, which the HTML option does.
  • In SQL, use your database's prepared statements in real programs; escaping by hand is for quick queries only.
  • Shell words are wrapped in single quotes, the safest form for bash and sh.

About this toolbox

Text is turned into bytes with UTF-8, so every language and emoji round-trips exactly. Base64, hex and binary work on those bytes; code points list each character as U+ followed by its hex number.

The escape formats follow each language's own rules: JSON per RFC 8259, JavaScript and Java / C# with \uXXXX, Python with \x, \u and \U, C with octal bytes, CSV per RFC 4180 (quotes doubled), SQL with doubled single quotes, and POSIX shell single quoting. Decoding understands the same escapes, and tells you where it found a problem.

Nothing is stored or sent: everything runs on your device.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product