Base64-Encoder/Decoder

Text in Base64 umwandeln und Base64-Zeichenfolgen schnell decodieren.

// about

Über dieses Tool

Base64 wandelt normalen Text in eine spezielle Zeichenfolge um. Mit diesem Tool können Sie Text in Base64 umwandeln oder Base64 wieder in lesbaren Text zurückübersetzen.

So verwenden Sie es

  1. Geben Sie Ihren Text in das Feld ein.
  2. Wählen Sie 'Codieren' oder 'Decodieren'.
  3. Klicken Sie auf 'Ausführen' und kopieren Sie das Ergebnis.

Warum dieses Tool genutzt wird

  • Ermöglicht den sicheren Textversand ohne Zeichenfehler.
  • Dekodiert Base64-Zeichenketten aus Links oder Code im Handumdrehen.
  • Einfacher Konverter für beide Richtungen.

Häufig gestellte Fragen (FAQ)

Ist Base64 eine Verschlüsselung?

Nein! Es ist nur ein Formatierungsstandard, um Übertragungsfehler zu verhindern.

Warum endet der Text oft mit '='?

Das sind Füllzeichen (Padding), um die richtige Datenlänge zu erreichen.

Werden Sonderzeichen und Emojis unterstützt?

Ja, alle internationalen Zeichen und Emojis werden problemlos verarbeitet.

Ratgeber · Kodierung · 10 Min. Lesezeit

Base64-Kodierung erklärt: Funktionsweise, Einsatzgebiete und verbreitete Irrtümer

E-Mail-Anhänge, Bild-Data-URIs und JWT-Token basieren auf Base64. Dieser Leitfaden erklärt genau, was Base64 tut, warum die Ausgabe länger als die Eingabe ist und wann Sie es einsetzen sollten und wann nicht.

Alle Computerdaten sind letztlich Bytes. Viele Kanäle können jedoch nur Text sicher transportieren: E-Mail-Texte, HTTP-Header, JSON-Dokumente und URLs. Schickt man rohe Bildbytes oder Chiffretext durch diese Kanäle, können Steuerzeichen und Zeilenumbrüche die Daten beschädigen, oder ein Zwischensystem schreibt sie um.

Man   → TWFu
Hi    → SGk=
한    → 7ZWc
안녕  → 7JWI64WV
Wie Base64 aus 3 Bytes 4 Zeichen macht, was das abschließende = bedeutet, wie sich Base64URL unterscheidet und warum Base64 keine Verschlüsselung ist.
Ratgeber lesen →
Mit KI bauen

Dieses Tool selbst mit KI bauen

Sie möchten eine eigene Version? Kopieren Sie den Arbeitsauftrag in einen KI-Chat oder speichern Sie die Skill-Datei für einen KI-Coding-Agenten. Beide enthalten die Funktionen, Sonderfälle und Testfälle, die wir verwendet haben.

Prompt und Skill sind auf Englisch, das KI-Tools in jeder Sprache gut verstehen.

KI-Arbeitsauftrag (Prompt)

Unverändert in Claude, ChatGPT oder Gemini einfügen.

You are an experienced full-stack web developer. Build a web tool called "Base64-Encoder/Decoder" that meets the requirements below.

## Goal

Build a two-way converter that encodes text to Base64 and decodes Base64 back to text.

## Core features

- Switch between encode and decode
- UTF-8 handling so non-English text and emoji work
- Choose standard Base64 or Base64URL (-, _)
- Option to keep or omit padding (=)
- Copy-to-clipboard button for the result

## Inputs

- Text or a Base64 string
- Mode (encode/decode), variant (standard/URL), padding on/off

## Outputs

- Converted string
- Byte length of input and output

## Edge cases and handling rules

- Strip spaces and line breaks before decoding
- Restore missing padding so the length is a multiple of 4
- Show an error with the position of any non-Base64 character
- Warn when decoded bytes are not valid UTF-8

## Implementation requirements

- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.
- Make the UI responsive and easy to use on mobile; label every input and keep everything keyboard accessible.
- Add a Copy button for results and show clear, friendly error messages for invalid input.
- Keep the core logic in functions separate from the UI so it can be unit-tested.

## Definition of done (test cases)

- 'Man' → 'TWFu' and 'Hi' → 'SGk='
- '한' → '7ZWc' and decodes back to '한'
- Bytes FB FF give '+/8=' in standard and '-_8=' in URL variant

First outline your implementation plan in at most five lines, then write the complete code, and finally explain how to check the test cases above.

Skill (SKILL.md)

Als .claude/skills/build-base64-tool/SKILL.md speichern, damit Agenten wie Claude Code es bei jeder Änderung am Tool wiederverwenden.

---
name: build-base64-tool
description: Use when building or changing a Base64-Encoder/Decoder tool. Build a two-way converter that encodes text to Base64 and decodes Base64 back to text.
---

# Build: Base64-Encoder/Decoder

## Goal

Build a two-way converter that encodes text to Base64 and decodes Base64 back to text.

## Workflow

1. Review the required features, inputs and outputs below and ask about anything missing first.
2. Implement the core logic as pure functions separate from the UI.
3. Check the logic against the test cases in the verification list.
4. Build a responsive UI with an input form, a result area and a Copy button.
5. Reproduce each edge case listed under Rules and refine the error messages.

## Core features

- Switch between encode and decode
- UTF-8 handling so non-English text and emoji work
- Choose standard Base64 or Base64URL (-, _)
- Option to keep or omit padding (=)
- Copy-to-clipboard button for the result

## Inputs

- Text or a Base64 string
- Mode (encode/decode), variant (standard/URL), padding on/off

## Outputs

- Converted string
- Byte length of input and output

## Rules

- Strip spaces and line breaks before decoding
- Restore missing padding so the length is a multiple of 4
- Show an error with the position of any non-Base64 character
- Warn when decoded bytes are not valid UTF-8
- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.

## Verification

- [ ] 'Man' → 'TWFu' and 'Hi' → 'SGk='
- [ ] '한' → '7ZWc' and decodes back to '한'
- [ ] Bytes FB FF give '+/8=' in standard and '-_8=' in URL variant

Tipps für die Arbeit mit KI

  • Nennen Sie in der ersten Zeile Ihren Stack (React, Vue oder reines HTML), damit der Code passt.
  • Lassen Sie die KI die Testfälle ausführen und die Ergebnisse zeigen, bevor Sie den Code übernehmen.
  • Fügen Sie keine echten Passwörter, Kundendaten oder API-Schlüssel ein; nutzen Sie Beispielwerte.