Base64-strings Encoderen en Decoderen Stap voor Stap
Quick Answer
Om Base64 te coderen: plak je tekst in de Base64 Encoder en de gecodeerde tekenreeks verschijnt direct. Om Base64 te decoderen: plak de Base64-tekenreeks in de Base64 Decoder en de originele tekst verschijnt. Alle verwerking gebeurt lokaal in je browser —je data wordt nooit geüpload.
Introduction
Base64 is een binaire-naar-tekst coderingsschema dat binaire data omzet in een ASCII-tekenreeks met 64 afdrukbare tekens (A-Z, a-z, 0-9, +, /). Het wordt veel gebruikt in e-mailbijlagen, Data URLs, JWT-tokens en API-payloads. Base64 is omkeerbare codering, geen encryptie —iedereen kan het decoderen zonder een key.
Step by Step
-
Open the Base64 tool
Go to the Base64 Encode & Decode tool page. The tool has two modes: Encode and Decode, selectable via tabs or a toggle.
-
Enter your input text
In Encode mode, paste or type the text you want to encode into the input textarea. Any text works — plain strings, JSON, URLs, or even emoji (the tool handles UTF-8 correctly).
-
Read the Base64 output
The tool encodes your input instantly using the browser's built-in btoa() function with UTF-8 handling. The Base64 output appears in the result field automatically — no button to click.
-
Copy the encoded string
Click the Copy button next to the output field to copy the Base64 string to your clipboard. You can now paste it into your API call, HTML Data URL, or config file.
-
Decode Base64 back to text
Switch to Decode mode and paste a Base64 string into the input field. The tool decodes it using atob() with UTF-8 support and shows the original text instantly. If the input is not valid Base64, an error message appears.
Examples
Encode a simple greeting
Input: Hello, World!
Output: SGVsbG8sIFdvcmxkIQ==
Encode JSON data
Input: {"user":"alice","id":42}
Output: eyJ1c2VyIjoiYWxpY2UiLCJpZCI6NDJ9
Decode a Base64 token
Input: SGVsbG8gV29ybGQ=
Output: Hello World
Encode Unicode text with emoji
Input: Hello 🌍
Output: SGVsbG8g8J+MjQ==
Common Problems
- Non-ASCII characters produce wrong output —use a tool with UTF-8 support like ours; naive btoa() throws on emoji.
- Base64 output is ~33% larger than the input —every 3 bytes becomes 4 Base64 characters.
- Padding characters (= or ==) at the end are required —removing them breaks decoding.
- Base64 is not encryption —anyone can decode it. Never store passwords or secrets as Base64.
Tips
- Use Base64 for Data URLs to embed small images directly in HTML or CSS without a separate HTTP request.
- For URL-safe Base64 (used in JWT), replace + with - and / with _, then strip padding.
- Always validate decoded output before using it in your application —a corrupted Base64 string may decode to garbage.
- Use our Base64 Encoder and Decoder tools for instant, private processing —no data leaves your browser.