ForHosting KIT · Developer Utilities

RFC 1924 Base85 encoder & decoder

“Hello World” becomes 7KPt{PR^XAyM<W in RFC 1924 Base85, the 85-character alphabet first proposed to write a 128-bit IPv6 address in twenty characters, here applied to any text, with no spaces, quotes or slashes to escape. 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
Hello World
Calculation mode
Encode
You get
Result
7KPt{PR^XAyM<W
Input
Hello World
Base85
7KPt{PR^XAyM<W
Alphabet name
rfc1924

RFC 1924 Base85 is a binary-to-text encoding that maps arbitrary byte sequences onto an eighty-five-symbol alphabet originally designed so a full 128-bit IPv6 address could fit in twenty printable characters instead of the longer colon-hex form.

An alphabet designed for IPv6 addresses

RFC 1924 proposed a compact way to write IPv6 addresses: treat the whole 128-bit address as one number and rewrite it in base 85, so it fits in twenty printable characters instead of the long colon-hex form. Its alphabet is fixed: the digits 0 to 9, the letters A to Z and a to z, and twenty-three punctuation marks such as !, #, %, & and ~. It deliberately leaves out the space, quotes, the comma, the period, the slash, the colon, brackets and the backslash, so encoded strings paste into shells and configuration files without quoting surprises. This tool applies the same alphabet to ordinary UTF-8 text.

How the conversion works and where it goes wrong

Your text is turned into UTF-8 bytes, read as one large number and divided by 85 again and again; each remainder picks a character from the alphabet. Leading zero bytes become leading 0 characters, because 0 is the first symbol, and decoding restores them. Hello World, 11 bytes, becomes the 14 characters 7KPt{PR^XAyM<W. The usual mistakes are pasting a string that contains a space, a comma or a quote, which the decoder rejects while naming the character and its position, and expecting a formatted IPv6 address with colons: this page converts text, not addresses.

What RFC 1924 Base85 is and how the alphabet is defined

RFC 1924 proposed a compact textual representation for IPv6 addresses by treating the 128-bit address as one unsigned integer and rewriting it in base eighty-five. The alphabet is fixed: digits zero through nine, uppercase A through Z, lowercase a through z, then twenty-three additional printable characters in this order: exclamation mark, number sign, dollar, percent, ampersand, left and right parentheses, asterisk, plus, hyphen, semicolon, less-than, equals, greater-than, question mark, at-sign, caret, underscore, backtick, left curly brace, vertical bar, right curly brace, and tilde.

That set deliberately omits space, quotes, comma, period, slash, colon, brackets, and backslash so encoded strings stay easier to paste into shells, configs, and protocols without quoting surprises. Encoding walks the input as a big-endian base-two-hundred-fifty-six integer, repeatedly divides by eighty-five, and maps each remainder to the alphabet; leading zero bytes become leading zero characters because zero is alphabet index zero.

Decoding reverses the map: each allowed character becomes a digit from zero through eighty-four, the big integer is rebuilt, and the byte array is recovered with the same leading-zero rule. When a character outside the alphabet appears, the decoder must fail loudly.

Teaching base-85 and the IPv6 compact alphabet

Classrooms encode Hello World, inspect the eighty-five symbols, then force invalid characters to show strict validation and error messages.

What alphabet does this RFC 1924 Base85 encoder use?

The RFC 1924 alphabet: 0-9, A-Z, a-z, then ! #$%&()*+-;<=>? @^_`{|}~. It is exactly eighty-five symbols and matches the set proposed for compact IPv6 text.

Does this format full IPv6 addresses with colons?

No. It encodes and decodes raw UTF-8 text under the RFC 1924 Base85 alphabet. It does not parse or emit colon-hex IPv6 presentation strings.

Is the RFC 1924 Base85 encoder free?

The browser tool is free and runs locally.

Why does my encoded string start with zeros?

Leading zero bytes in your data become leading 0 characters, because 0 is the first symbol of the alphabet. Decoding turns each of them back into a zero byte, so the original bytes come back exactly.

What happens if I decode a string with a space or a comma?

Decoding stops with a clear message that names the character and its position. Spaces, commas, quotes, brackets and any other symbol outside the 85-character alphabet are rejected, so a damaged string never turns silently into different text.

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/base85-rfc1924

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/base85-rfc1924 \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello World"}'
{
  "text": "Hello World"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "enc.base85_rfc1924",
  "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.

max_chars100000
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.

This tool applies that same alphabet and the same repeated-division algorithm to ordinary UTF-8 text: choose encode to turn a phrase into a compact Base85 string, or decode to recover the original text from a payload that uses only the RFC 1924 symbols. Characters outside the alphabet—spaces, commas, quotes, brackets, or any glyph not listed in the standard—are rejected with a clear invalid_input error that names the character and its index, so scripts never silently invent a different payload.

How to call the API and what the response contains

The default mode is encode: UTF-8 bytes of text become an RFC 1924 Base85 string. Send a JSON body with a required string field text (aliases input, value, and data) and an optional mode that is either encode or decode. Mode decode treats text as a Base85 payload and returns the recovered UTF-8 string. Input length is capped at one hundred thousand characters so a single request cannot exhaust Worker memory on pathological big-integer expansion. On success for encode, the response includes mode, input, result and base85 with the same encoded string, alphabet with the full eighty-five-character constant, alphabet_name set to rfc1924, input_bytes as the UTF-8 byte count, output_length as the encoded character count, and a short English message. On success for decode, the response includes mode, input, result and text with the decoded UTF-8 string, the same alphabet fields, input_length, output_bytes, and a matching message. Failed validation—missing text, non-string text, oversize input, an unknown mode, an invalid Base85 character, or decoded bytes that are not valid UTF-8—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.

Practical tips, limits, and how this differs from other bases

Round-trip checks are the fastest smoke test: encode a known phrase such as Hello World, store the result, decode it, and confirm you recover the original phrase byte-for-byte. Prefer RFC 1924 Base85 when you need the historical IPv6-compact alphabet and strict symbol validation; prefer Base64 when maximum interoperability matters more than that specific eighty-five-symbol set. When teaching, show the same sentence under Base85, Base58, and Base64 so learners see how alphabet choice changes density, readability, and which characters are legal. Deliberately include a forbidden character—a space, comma, quote, or colon—in a decode request to assert that your client handles invalid_input and the error message that names the index. Keep payloads under the published character limit; extremely long strings expand as big integers and are better split or handled offline. This tool is not an IPv6 presentation-format parser: it does not expand compressed colon-hex, insert zone indices, or enforce twenty-digit fixed width for 128-bit addresses unless your caller pads and interprets that way. It is also not Adobe Ascii85 or ZeroMQ Z85—those use different symbol orderings and framing rules. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when you fuzz invalid alphabet characters.

Fixture round-trips in continuous integration

Generate known RFC 1924 Base85 strings from fixture text and assert decode recovers the same UTF-8 bytes in CI without a third-party codec dependency.

Compact payload labels for configs and notes

Encode short labels with the RFC 1924 alphabet so strings avoid spaces, quotes, and commas that break naive shell or CSV pasting.

What happens if I decode a string containing a space, comma, or quote?

The API returns invalid_input, names the bad character and its index, and states that only the RFC 1924 Base85 alphabet is allowed. Failed tasks are not charged.

Is RFC 1924 Base85 the same as Adobe Ascii85?

No. Ascii85 uses a different character range and often wraps payloads with <~ and ~>. This capability uses the RFC 1924 symbol table and big-integer conversion without Ascii85 framing.

Read the full KIT documentation →