Base64 Encoder & Decoder — Free Online Tool

Encode any text or JSON to Base64, or decode Base64 back to plaintext. Free, instant, no data stored.

From
To
Input · JSON
Output · Base64
Input 0 chars
Output 0 chars
Session conversions 0

64 About This Converter

Base64 is a binary-to-text encoding scheme that represents binary data using only printable ASCII characters (A–Z, a–z, 0–9, +, /). It is widely used to safely embed binary data in text-based systems that cannot handle raw bytes.

FormatSwitch encodes your text or data to Base64 and decodes Base64 back to plaintext — instantly, without storing anything.

Common Use Cases

  • 🔐 Decode JWT (JSON Web Token) payloads to inspect claims
  • 📧 Encode email MIME attachments and inline images
  • 🖼️ Create CSS data URIs: background-image: url("data:image/png;base64,...")
  • 🔑 Encode API keys or credentials for HTTP Basic Authentication headers

Tips & Notes

  • Base64 output is approximately 33% larger than the original input — it is an encoding, not a compression.
  • Base64 is NOT encryption. Anyone with the encoded string can decode it trivially. Never use it to secure sensitive data.
  • JWT tokens consist of three Base64URL-encoded parts separated by dots. Paste the middle part to decode the payload.
  • URL-safe Base64 replaces + with - and / with _ to avoid conflicts in query strings. Standard and URL-safe are interchangeable for decoding.
  • The = padding at the end of a Base64 string indicates the original data length modulo 3.

Supported Conversions — Video, Audio, PDF, JSON, YAML, CSV & More

About FormatSwitch — Free File & Format Converter

FormatSwitch is a free, browser-based conversion tool that supports over a dozen popular file and data formats. No account needed, no file size limits for text formats, and no data is retained after conversion.

📄 PDF to Word (DOC / DOCX)

Convert PDF files into fully editable Word documents online — no software needed. Preserves headings, paragraphs, and tables. Ideal for contracts, reports, and scanned text. Upload your PDF and download an editable DOCX in seconds.

→ How to convert PDF to Word without software

📝 Word (DOCX) to PDF

Turn Word documents into polished, share-ready PDFs instantly. Perfect for protecting formatting across devices when printing or sending to clients. Works entirely in your browser with fast, server-side processing.

🔄 JSON ↔ YAML

Instantly switch between JSON and YAML — the two most popular data serialization formats used by developers. Perfect for Kubernetes manifests, Docker Compose files, CI/CD pipelines, and REST API development.

🔁 JSON ↔ XML

Convert JSON objects to valid, well-formed XML markup and back again. Useful for integrating with SOAP APIs, legacy enterprise systems, and transforming config files across formats.

📊 CSV ↔ JSON

Transform Excel exports and database CSV dumps into clean JSON arrays — or reverse the process. Great for ETL pipelines, front-end data tables, and feeding structured data into APIs.

🔐 Base64 Encoder / Decoder

Encode text, binary data, or images to Base64 and decode back to plaintext. Commonly used in JWT tokens, email MIME attachments, Data URIs, and embedding images directly into HTML or CSS.

🔗 URL Encoder / Decoder

Percent-encode special characters for safe use in URLs, query strings, and API parameters. Also decodes URL-encoded strings back to human-readable text — handy for debugging web requests.

🔒 Private & Secure

Text conversions are processed instantly without storing your data. File conversions (PDF/DOCX) are handled server-side over HTTPS and are never logged or shared. Your data stays yours.

How to Use FormatSwitch

FormatSwitch is designed to be instant and frictionless. No account, no upload queue, no waiting. Here's a step-by-step guide for each type of conversion.

Text Format Conversions (JSON, YAML, XML, CSV…)

  1. 1 Select the From format in the left dropdown (e.g. JSON).
  2. 2 Select the To format in the right dropdown (e.g. YAML).
  3. 3 Paste or type your input data into the left text area.
  4. 4 Click Convert — output appears instantly on the right.
  5. 5 Click Copy to copy the result to your clipboard.

File Conversions (PDF ↔ DOCX)

  1. 1 Select PDF as From and DOCX as To (or the reverse).
  2. 2 The text area changes to a file upload zone.
  3. 3 Drag and drop your file or click to browse.
  4. 4 Click Convert File — the file is processed server-side over HTTPS.
  5. 5 When done, a Download button appears. Click it to save your file.

Format-Specific Tips

JSON → YAML

Great for Kubernetes configs and Docker Compose. FormatSwitch preserves array ordering and nested objects. Multi-line strings are automatically represented with YAML block scalars.

YAML → JSON

Useful when feeding config data into APIs or Node.js scripts. All YAML anchors and aliases are resolved before output.

CSV → JSON

The first row is treated as the header. Each subsequent row becomes a JSON object. Works with comma or semicolon delimiters.

JSON → XML

Array elements are wrapped in <item> tags. JSON keys become XML element names. Best for SOAP or legacy enterprise integrations.

Base64 Encode / Decode

Paste raw text or a data URI and toggle encode/decode. Useful for JWT payloads, email MIME parts, and CSS background images.

Markdown → HTML

Full CommonMark support: headings, bold, italic, links, images, code blocks, and tables. Output is clean, unstyled HTML ready to embed.

URL Encode / Decode

Encodes all reserved characters per RFC 3986. Useful for query strings, OAuth parameters, and debugging percent-encoded URLs.

Text ↔ HEX

Converts each character to its hexadecimal byte representation. Handy for inspecting binary protocols or generating CSS color values.

Case Conversion

Converts identifiers between camelCase, snake_case, PascalCase, kebab-case, UPPER_SNAKE, and lowercase. Handles multi-word phrases intelligently.

Frequently Asked Questions

Is FormatSwitch completely free?

Yes — 100% free with no account, no subscription, and no hidden limits. The tool is supported by non-intrusive display advertising only.

Is my data safe and private?

Text conversions happen in PHP and are returned over HTTPS — nothing is written to a database or log. File uploads (PDF/DOCX) are processed ephemerally and deleted after delivery.

Which formats are supported?

JSON, YAML, XML, CSV, Excel CSV, TOML, Base64, URL encoding, Markdown → HTML, Text ↔ HEX, Case Conversion (camelCase, snake_case, PascalCase, kebab-case), and PDF ↔ DOCX.

Can I convert large files?

Text conversions handle large payloads efficiently. For files over 5 MB, a local CLI tool like jq, yq, or pandoc may perform better. PDF/DOCX conversions are limited to reasonable sizes.

Do I need to install anything?

No. FormatSwitch runs entirely in your browser (for text) and server-side (for files). There is nothing to install, configure, or sign up for.

Can I convert PDF to Word without losing formatting?

Our PDF to DOCX converter uses pdfplumber and python-docx to preserve paragraphs, headings, and tables as accurately as possible — no LibreOffice required.