📄 expo/versions/v52.0.0/sdk/encoding

File: encoding.md | Updated: 11/15/2025

Source: https://docs.expo.dev/versions/v52.0.0/sdk/encoding

Hide navigation

Search

Ctrl K

Home Guides EAS Reference Learn

Reference version

SDK 52

Archive Expo Snack Discord and Forums Newsletter

Encoding

GitHub Changelog npm

Standard TextEncoder and TextDecoder APIs available on all Expo-supported platforms.

GitHub Changelog npm

Android

iOS

tvOS

Web

Copy page


The standard URL API is available on all Expo-supported platforms.

Installation


This API is part of the expo package. Refer to the browser and server runtime support for web and Node.js.

Usage


TextEncoder and TextDecoder are available globally without any need to import them.

// [104, 101, 108, 108, 111] const hello = new TextEncoder().encode('hello'); // "hello" const text = new TextDecoder().decode(hello);

TextEncoder


The TextEncoder API is included in the Hermes engine. See the source code in TextEncoder.cpp inside the Hermes GitHub repository .

TextDecoder


The TextDecoder API is not spec-compliant on native platforms. Only the UTF-8 encoding is supported. If you need support for more encodings, use a polyfill like text-encoding .