ForHosting KIT · Developer Utilities

Base64 encoder decoder

One converter for both directions: “Ready when you are.” becomes UmVhZHkgd2hlbiB5b3UgYXJlLg==, and any standard Base64 turns back into readable text, emoji and other scripts included, with a hard stop when a paste is not valid Base64. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Text
Ready when you are.
You get
Result
UmVhZHkgd2hlbiB5b3UgYXJlLg==
Calculation mode
Encode
Charset
utf-8
Input length
19

A Base64 encoder decoder is the two-way converter people open when they need both directions in one place: turn a plain-text string into Base64, or restore Base64 back to readable text, by choosing encode or decode. Searchers who type that phrase want a mode switch, a copyable result, and a hard stop when a paste is not valid Base64—not a silent string of replacement characters. This capability accepts UTF-8 text, applies the standard RFC 4648 alphabet with equals padding, and returns the converted string together with the resolved mode and character counts.

How the Base64 encoder decoder converts text in both directions

Choose mode encode to treat the required text field as UTF-8 plaintext. The engine walks the code points, including emoji and non-Latin scripts, writes a UTF-8 byte stream, then consumes that stream in groups of three bytes. Each trio becomes four characters from A through Z, a through z, zero through nine, plus, and slash.

When one or two bytes remain, the encoder emits the matching partial quartet and finishes with one or two equals signs so the output length is always a multiple of four. That padding is the classic RFC 4648 dialect people expect when they search for a Base64 encoder decoder rather than a URL-safe variant. Leave mode empty and encode is assumed, which matches the most common first click: type a phrase, get a paste-safe string.

The mapping is pure arithmetic: identical text always yields identical Base64, with no salt, no clock, and no network. Empty plaintext is valid and encodes to an empty result, which is useful when a pipeline must not special-case blank fields.

Workflows, pricing, and when a two-way encoder decoder earns its keep

Call the free in-browser Base64 encoder decoder for classroom demos, support playbooks, and one-off conversions without installing OpenSSL or language runtimes. Another workflow verifies that a documentation sample still decodes to the documented plaintext before a release, catching a truncated equals sign that would otherwise ship as a broken snippet. Authors shipping SDKs can map the result field straight into a copy button, while mode and charset labels make screenshots and OpenAPI examples self-explanatory for readers who only know the classic alphabet with equals signs.

Keep requests to ordinary text sizes, treat invalid Base64 as a client error rather than a retry storm, and you get a reproducible two-way converter for homework, LMS plugins, and edge workers without standing up a cryptography library of your own.

What does a Base64 encoder decoder do?

It converts a plain UTF-8 string to standard Base64 when mode is encode, and converts a Base64 string back to text when mode is decode. The converted string is returned in result.

Which mode should I send if I only have one field of text?

Omit mode or set it to encode to treat text as plaintext. Set mode to decode when text is already Base64. The default is encode.

Why does decode fail on my paste?

URL-safe minus and underscore characters are rejected; use plus, slash, and optional equals padding.

Does the encoder decoder keep emoji and non-English letters?

Yes. Encode walks full Unicode, writes UTF-8 bytes, then Base64-encodes those bytes. Decode restores the same UTF-8 string, including emoji and non-Latin scripts.

Why is the Base64 result longer than my text?

Because every three bytes of text become four Base64 characters, and one or two equals signs round the length up to a multiple of four. “Ready when you are.” has 19 characters and becomes 28, ending in two equals signs.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/enc/base64-encoder-decoder

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/enc/base64-encoder-decoder \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Ready when you are."}'
{
  "text": "Ready when you are."
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "enc.base64_encoder_decoder",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Encoding is a pure, deterministic mapping from Unicode to ASCII; decoding rejects illegal alphabet characters, broken padding, and non-UTF-8 payloads with invalid_input so scripts can fail closed.

How the Base64 encoder decoder converts text in both directions

A Base64 encoder decoder is a two-way converter: the same form either packs Unicode text into the sixty-four character alphabet used by JSON, email, and configuration files, or unpacks that alphabet back into the original string. The response puts the converted string in result, echoes the resolved mode, reports charset as utf-8, and reports input_length and output_length so a client can show both sides of the round trip without a second call. Aliases input, value, and payload are accepted for the same string when older forms or generated clients use those names.

Decode mode, alphabet checks, and invalid Base64 errors

Set mode to decode and put a standard Base64 string in text. The engine does not silently remap URL-safe minus and underscore variants, because that would blur the product promise of a classic encoder decoder with plus, slash, and equals. Successful decode returns result as the recovered string, mode decode, charset utf-8, and the character counts of the submitted Base64 and the recovered text. Prefer this capability when the search intent is literally a Base64 encoder decoder for human-readable content; binary image data URIs belong to image-oriented tools, and cookie-safe alphabets belong to specialized URL-safe encoders. Spaces, tabs, and newlines are stripped so a wrapped paste from an email or a log still works, but every other character outside the standard alphabet causes an immediate invalid_input failure. Padding equals signs may be present or omitted when the remainder is legal; a length whose modulo four is one, more than two pads, pads in the middle of a quartet, or a pad in the first two positions of a group are rejected with an explicit message so clients can fix the payload instead of guessing. After alphabet validation, the recovered bytes are decoded as UTF-8 with a fatal decoder: truncated sequences, overlong encodings, and surrogate code points fail as invalid_input rather than producing replacement characters that would corrupt downstream displays. Validation failures are not charged on the prepaid API, so probing a suspicious token is cheap for operators and safe for end users.

Workflows, pricing, and when a two-way encoder decoder earns its keep

Use the prepaid KIT API when a backend, serverless function, or SDK needs the same encode or decode step under balance at $0.002 per successful item; failed validation never consumes balance after the engine rejects the request. A typical workflow encodes a short configuration value for storage in an environment variable, ships it through a ticket system, then decodes it on the receiving service with mode decode and asserts that output_length matches the original character count. Pair this endpoint with percent-encoding tools when a string must survive both Base64 and query-string rules, but keep the steps separate so each landing page matches a single search intent.

Round-trip tokens through text-only channels

Encode a UTF-8 fragment so it survives chat, email, and JSON, then decode it on the receiving side with the same encoder decoder and mode field.

Documentation and continuous-integration fixtures

Pin both encode and decode goldens so a truncated paste or an alphabet drift fails the build before a sample ships to readers.

Support desks and classroom labs

Agents and students convert text both ways in the free browser widget and get a clear invalid_input error when a Base64 paste is corrupted.

What does the Base64 encoder decoder cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →