Utility APIs for developers
20 text, encoding, checksum, number and identifier APIs. Real requests, complete parameters and tested examples.
Quick start
Send a JSON object with POST. No API key is required. Successful responses contain ok:true and data; API-generated errors contain ok:false and error. Start with an endpoint below or download the OpenAPI 3.1 definition.
curl --fail-with-body --request POST 'https://www.base64.sh/api/v1/base64/' \
--user-agent 'Base64.sh API example/1.0' --header 'Content-Type: application/json' \
--data-raw '{"text":"Hello 世界"}'
Encoding
Base64 API
Encode UTF-8 text as Base64 or decode it through a JSON HTTP API, with standard and URL-safe alphabets.
Base32 API
Convert UTF-8 text to RFC 4648 Base32 and decode valid Base32 text with a scriptable HTTP endpoint.
Base58 API
Encode and decode short UTF-8 strings using the Bitcoin Base58 alphabet, preserving leading zero bytes.
URL Encoding API
Percent-encode or decode a URL component, full URI or form value with explicit encoding modes.
Hex to Text API
Decode hexadecimal UTF-8 bytes into text or encode text as hexadecimal, with strict byte validation.
Text to Binary API
Convert UTF-8 text into eight-bit binary bytes, or decode a binary byte string into text.
HTML Entity API
Encode plain text as HTML entities or decode named and numeric HTML character references through an API.
ROT13 and ROT47 API
Apply ROT13 to ASCII letters or ROT47 to printable ASCII characters through a reversible text API.
Data
Checksums
SHA-1 API
Calculate a SHA-1 digest of UTF-8 text and receive its lowercase hexadecimal representation in JSON.
SHA-256 API
Calculate a SHA-256 digest of UTF-8 text and receive its lowercase hexadecimal representation in JSON.
SHA-512 API
Calculate a SHA-512 digest of UTF-8 text and receive its lowercase hexadecimal representation in JSON.
CRC32 API
Calculate the standard IEEE CRC-32 checksum of UTF-8 text, returning hexadecimal and unsigned decimal values.
Text
Word Counter API
Count words, Unicode characters, sentences, paragraphs and UTF-8 bytes, with configurable reading and speaking time estimates.
Slug Generator API
Generate URL slugs with accent transliteration, configurable separators, word-boundary length limits and optional stop-word removal.
Text Line Tools API
Sort, deduplicate, reverse, trim, number or wrap text lines through a single JSON endpoint.
Simplified and Traditional Chinese API
Convert Chinese text with OpenCC phrase dictionaries, including mainland, Taiwan and Hong Kong variants.
Identifiers
Numbers
Limits and error handling
Requests require Content-Type: application/json and a UTF-8 JSON object. The body limit is 32 KiB (32,768 bytes), text fields allow up to 16,384 Unicode code points unless a smaller limit is listed, and responses are limited to 256 KiB. Unknown parameters and unpaired Unicode surrogates in parameter strings are rejected. Send inputs in the request body, not query parameters.
Anonymous access is limited to approximately 60 POST requests per minute per IP address, shared across endpoints in each Cloudflare location. Shared networks share the allowance. Counters are eventually consistent, not a guaranteed global quota. On HTTP 429, wait for the Retry-After interval before retrying; avoid immediate retry loops.
Programmatic clients should send an identifying User-Agent, as shown in the cURL and Python examples. Browser fetch supplies its own header. Cloudflare may reject a generic or missing agent before the API runs; an edge-generated 403 can be plain text or HTML rather than the JSON envelope. See Cloudflare error 1010.
- 400 · Invalid input
- Malformed JSON, missing fields, unsupported options or invalid encoded text. Correct the input before retrying.
- 403 · Edge request blocked
- Check the User-Agent and the Cloudflare error response before retrying.
- 404 · Unknown endpoint
- Use a documented /api/v1/{tool}/ endpoint.
- 405 · Method not allowed
- Use POST. OPTIONS is supported for browser CORS requests.
- 413 · Size limit exceeded
- Reduce the request size or the generated output.
- 415 · Unsupported media type
- Set Content-Type: application/json.
- 429 · Rate limited
- Wait at least the Retry-After number of seconds.
- 500 / 503 · Service unavailable
- Retry later with bounded backoff. Availability is not guaranteed.
API data processing
API inputs are sent over HTTPS and processed in memory by a Cloudflare Worker. The application does not persist submitted text or deliberately log request bodies, and API responses use Cache-Control: no-store. Cloudflare may process network metadata under its own policies. For local processing, use the corresponding browser tool. See the privacy policy.