Text to Base64

Turn any text into a base64 string, standard or URL-safe

Output format
Read only

What is the Text to Base64 Tool?#

The Text to Base64 Tool converts any text into a base64 string. Type or paste your text and the encoded result updates as you type, ready to copy.

Base64 represents text with letters, numbers, and a few symbols. It is commonly used to embed data in JSON, configuration files, and URLs where special characters would cause problems.

How to Use#

  1. Type or paste the text you want to encode.
  2. Turn on URL-safe base64 if the result will go into a URL.
  3. Copy the output and use it where you need it.

Standard and URL-safe Base64#

  • Standard base64: uses A–Z, a–z, 0–9, plus +, /, and = padding. Every base64 decoder accepts this form.
  • URL-safe base64: replaces + with - and / with _, and drops the = padding. The result can be inserted into a URL without extra escaping.

Common Use Cases#

  • Encode a value before pasting it into a JSON or YAML configuration file.
  • Prepare a short string to embed in a URL or query parameter.
  • Pass text with special characters through systems that would otherwise mangle them.
  • Generate base64 test data while checking an API or a decoder.

Frequently Asked Questions#

Notes#

  • URL-safe base64 is not standard base64. Decoders that expect +, /, and = will reject it, so restore the standard form before decoding.
  • Very long text is processed in the browser's memory. Extremely large inputs may take time to encode.
  • Encoder

Last updated:

Related tools