South Star

Mojibake Text Encoding Fixer Repair Mangled UTF 8 API

Free tier included · Text Analysis
Detect and fix mojibake text, double-encoded UTF-8, and legacy charsets (Shift_JIS, EUC-JP, cp1251). Batch repairs, base64 decoding, offline.

Mojibake Text Encoding Fixer repairs text mangled by wrong encoding, such as UTF-8 read as cp1251 or latin-1, double-encoded strings, and broken character sets. Beyond single-string fix and detect endpoints, this service includes advanced diagnosis with confidence scores and warnings (`/decode/full`), batch repair for up to 100 items in a single request (`/batch`), and raw base64 byte decoding with candidate character set support including Japanese Shift_JIS, EUC-JP, Latin-1, and cp1251 (`/decode/base64`). You can also list all supported legacy and East Asian encodings on demand (`/encodings`).

The service operates completely offline. It makes no external network calls, stores nothing, keeps no request logs, and has no cross-request state, making it ideal for privacy-sensitive data processing, ETL pipelines, and scraping cleanups.

Honest limits: Individual text inputs must not exceed 1 MB (1,048,576 bytes of UTF-8 encoded text). Batch requests accept up to 100 strings per call. While heuristic repair is remarkably accurate, heavily corrupted text lacking sufficient redundancy may occasionally yield ambiguous or incomplete fixes.

Endpoints

MethodPathWhat it does
GET/Root
GET/healthHealth
POST/fixFix
POST/detectDetect
POST/decode/fullAdvanced diagnosis with confidence score and warnings
POST/batchBatch text repair
POST/decode/base64Decode and repair from base64 raw bytes
GET/encodingsList supported character encodings

Quick start

curl -X POST "https://mojibake.p.rapidapi.com/fix?uncurl_quotes=true" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: mojibake.p.rapidapi.com" \
  -H "Content-Type: application/json" \
  -d '{"text": "привет, мир"}'

FAQ

What is mojibake and how does this API fix it?

Mojibake occurs when text encoded in one character set (like UTF-8) is incorrectly decoded using another (like CP1251 or Latin-1). The API uses heuristics and algorithms from `ftfy` and `charset-normalizer` to automatically detect and reverse this mapping.

Can I process multiple strings or raw bytes in a single call?

Yes. You can send up to 100 items in a single request using `POST /batch`, or decode raw bytes and legacy character sets (such as Japanese Shift_JIS or EUC-JP) via `POST /decode/base64`.

Are my texts logged or stored anywhere?

No. The API is entirely stateless and offline. No request payloads, texts, or logs are saved to disk or databases.

What are the input size limitations?

Individual text inputs must not exceed 1 MB (1,048,576 bytes of UTF-8 encoded text), and batch requests are capped at 100 items per call.

Try Mojibake Text Encoding Fixer Repair Mangled UTF 8 free

Free tier on every plan. Get an API key and start calling in under a minute.

Open on RapidAPI

Related APIs