Skip to main content
D
JavaScript
JavaScript JSON

JavaScript JSON

JSON securely transports text data across the internet.

Read Time
5 min read
Difficulty
Beginner
Last Updated
Jun 15, 2026
Version
v1.0.0

Introduction

JSON stands for JavaScript Object Notation. It looks exactly like a JavaScript object, but it is just plain text. Because it is plain text, any programming language can read it, making it the perfect format for sending data between a server and a web page.

Example

Example
1/* this parses JSON */
2let jsonText = '{"name":"John", "age":30}';
3let userObj = JSON.parse(jsonText);
4console.log(userObj.name);

Key Points

  • `JSON.parse()` converts a JSON string into a JavaScript object.
  • `JSON.stringify()` converts a JavaScript object into a JSON string.
  • JSON data requires double quotes around names and values.
  • It cannot store functions or date objects directly.

Up Next

Continue your journey with the next topic.

Go to JS Error Handling