Web APIs

Encoding API

Checking compatibility...

Handle text in various character encodings, including legacy non-UTF-8 encodings. Perfect for text processing, file handling, and international character support.

Text Encoding

Transform text strings into binary data using TextEncoder. This is essential when you need to send text over the network, store it efficiently, or process it with binary operations. The API handles all Unicode characters correctly, including emojis and international scripts.

=
=
=
=
=
=

Output

Click Run to see output...

Text Decoding

Convert binary data back into readable text using TextDecoder. This lets you process data from files, network responses, or other binary sources and display it as human-readable content. The decoder automatically handles different character encodings and can preserve special characters.

=
=
=
=
=
=

Output

Click Run to see output...

Stream Decoding

Process text data chunk by chunk as it arrives using TextDecoderStream. This is perfect for handling large files or network responses without waiting for all the data to download. It works seamlessly with the Streams API to efficiently process text data in real-time.

=
=
=
=
=
=

Output

Click Run to see output...

Legacy Encodings

Work with older text formats like Windows-1252, ISO-8859, or Shift-JIS that are still used in legacy systems. The Encoding API supports these formats through TextDecoder options, making it easy to handle international data or content from older databases and systems.

=
=
=
=
=
=

Output

Click Run to see output...