Eina JavaScript

Convertidor de JSON a objecte JavaScript online

Converteix JSON vàlid en codi JavaScript llegible directament al navegador.

HostingerHosting ràpid per a la teva webAllotjament, domini i SSL en un sol lloc.Veure oferta ↗HostingerLlança la teva web avuiHosting fiable per a projectes nous i webs en creixement.Veure oferta ↗

JSON to JavaScript Object converter

Opcions avançades
El JSON es processa localment al teu navegador.
JavaScript Object

Guia

Com convertir JSON a JavaScript?

JSON can be represented as JavaScript objects and arrays. This tool generates readable text and never executes the result.

JSON versus JavaScript Object

JSON requires quoted keys and supports only strings, numbers, booleans, null, objects and arrays. JavaScript may omit quotes for valid identifiers and is part of the language.

JSON.parse()

JavaScript can convert JSON with JSON.parse(json). This tool directly shows an equivalent representation for copying or review.

Large numbers

JavaScript may lose precision for integers outside Number’s safe range. The tool warns you and does not silently convert them to BigInt.

Nested objects

Nested objects and arrays are preserved, along with Unicode strings, accents, emojis, null and boolean values.

Frequently asked questions

Preguntes freqüents

How do I convert JSON to a JavaScript object?

Paste valid JSON, choose the name and declaration, then select Convert.

Are JSON and a JavaScript Object the same?

Not exactly. JSON is a data format with stricter rules; a JavaScript object is a language structure.

Why does JSON require quoted keys?

It is a JSON format rule. The output removes quotes only when a key is a safe identifier.

Can I convert JSON arrays?

Yes. Root arrays and nested arrays are converted directly.

Are nested objects preserved?

Yes. Object and array structure is preserved recursively.

Are emojis and Unicode supported?

Yes. Unicode strings remain readable unless characters require JavaScript escapes.

What happens to very large numbers?

A warning is shown because Number may lose precision. Values are not silently converted to BigInt.

Does the tool execute generated JavaScript?

No. The result is treated only as text and is never executed.

Is entered JSON stored?

No. It is processed locally in your browser and is not saved.