All Tools View Categories About Contact Privacy

Base64 Encoder/Decoder for Env Values

Encode or decode env values to/from base64 — per value or whole file, with URL-safe option.

Runs entirely in your browser — nothing is uploaded.

About Base64 Encoder/Decoder for Env Values

Base64 is the classic escape hatch for configuration: it lets a value containing a newline, a quote, or a non-ASCII character travel through a system that only accepts safe text. The Base64 Encoder/Decoder applies it precisely — one value at a time, or the whole .env in batch.

Two features keep it dependable. First, everything goes through UTF-8, so accented characters and emoji survive a round trip instead of turning into mojibake. Second, a URL-safe mode switches the alphabet to - and _, for values destined to live inside URLs, tokens or query strings.

The tool runs fully in your browser — nothing is uploaded, and multi-line values are handled as complete units.

Features

  • Per-value encode/decode: split by lines or custom separator.
  • Batch file mode: all values in a .env at once.
  • UTF-8 safe: emoji and non-Latin scripts preserved.
  • URL-safe alphabet: - and _ instead of + and /.
  • Padding control: include or strip = padding.
  • Round-trip clean: decode(encode(x)) == x.
  • Copy or download: export results.
  • Private: 100% in-browser.

How to Use

  1. Choose direction (encode or decode) and alphabet (standard or URL-safe).
  2. Paste values — one per line — or a whole .env file in batch mode.
  3. Click Convert. Every value is transformed independently.
  4. Copy or download the result.

Examples

Example 1 — Newline in a secret. A PEM key contains newlines that break a single-line parser; base64-encoding the value keeps it intact.

Example 2 — CI build arg. A build pipeline accepts only simple strings; the team base64-encodes the SSH key before passing it as an argument.

Example 3 — URL-safe token. A signed value goes into a query string; URL-safe mode keeps the + and / out of the URL.

Example 4 — Emoji in config. A product name with accented characters survives a full encode/decode round trip thanks to UTF-8 handling.

Example 5 — Batch decode of a dump. A mis-encoded .env is pasted in batch mode and restored in one click.

Benefits

  • Precise per-value: no accidental cross-line joins.
  • Batch power: whole files in one pass.
  • Unicode safe: UTF-8 under the hood.
  • Two alphabets: standard and URL-safe.
  • Private: nothing uploaded.
  • Free: always available.

Frequently Asked Questions

What does this tool do?
Converts individual values (or whole .env files) between plain text and base64. Each value is handled as its own unit, so multi-line and UTF-8 content works correctly.
Why base64-encode env values?
To safely embed values that contain newlines, quotes, or other parser-hostile characters, or to pass binary-ish data through text-only config systems like CI build args.
Is it UTF-8 safe?
Yes. Values are encoded to UTF-8 bytes before base64, which handles emoji, accented characters and non-Latin scripts correctly rather than mangling them.
What is URL-safe base64?
The standard alphabet uses + and /, which are problematic in URLs. URL-safe base64 uses - and _ instead and drops padding; the option toggles between them.
Can I process a whole file at once?
Yes. Batch mode encodes or decodes every value in a .env file while preserving keys, comments and line structure.