toolqik

160 · Text

Text Encoder

Encode text as Base64, URL, HTML entities, Unicode escapes, hex, binary and more.

Runs in your browser
Encoded

  

About this tool

One place for every common text encoding. Pick a format and the encoded text appears as you type. Encoding works on UTF-8 bytes, so accented letters, non-Latin scripts and emoji are handled correctly, unlike JavaScript’s btoa(), which fails on anything outside Latin-1.

Encodings compared

Format“café & 👋” becomesUsed for
Base64Y2Fmw6kgJiDwn5GLEmail attachments, data URLs, binary in JSON, HTTP Basic auth
Base64URLY2Fmw6kgJiDwn5GL with -/_, no paddingJWTs, URL-safe tokens
URL encodingcaf%C3%A9%20%26%20%F0%9F%91%8BQuery strings and URL paths
HTML entitiescafé & 👋Showing text safely inside HTML
Unicode escapescaf\u00E9 & \uD83D\uDC4BJSON, JavaScript, Java, C# string literals
Hex63 61 66 c3 a9 20 26 20 f0 9f 91 8bDebugging bytes, protocols, hashes
Quoted-printablecaf=C3=A9 & =F0=9F=91=8BEmail bodies (MIME)
ROT13pnsé & 👋Hiding spoilers (not security)

Which one do I need?

  • Putting text in a URL or query string: URL encoding (or the URL encoder for full URLs).
  • Showing user text inside HTML: HTML entities, so < and & can’t break the page or inject markup.
  • Sending binary or arbitrary text through a text-only channel (JSON, email, environment variables): Base64.
  • Writing a string literal in code that must stay ASCII: Unicode escapes.
  • Inspecting the exact bytes: hex or binary.

Encoding is not encryption: anyone can decode these formats. To turn encoded text back, use the text decoder, which can detect the format automatically.

FAQ

How do I encode text to Base64?

Choose Base64 and type or paste your text. The Base64 output appears instantly. UTF-8 is used, so emoji and accents work.

What is the difference between Base64 and Base64URL?

Base64URL replaces + and / with - and _ and drops the = padding, so the result can be used in URLs and file names. JWTs use Base64URL.

Why does btoa() fail on my text?

btoa() only accepts characters up to U+00FF. Text has to be converted to UTF-8 bytes first, which this tool does.

Is encoding the same as encryption?

No. Encodings like Base64 and hex are reversible by anyone. Use encryption if the content must be secret.

How do I encode text as binary?

Choose Binary. Each UTF-8 byte is shown as 8 bits, separated by spaces.

esc
↑↓ navigate↵ open