🍸 Nette NEON: encodes and decodes NEON file format.

Installs: 13 846 138

Dependents: 263

Suggesters: 14

Security: 0

Stars: 609

Watchers: 51

Forks: 28

Open Issues: 11

v3.2.0-RC 2020-03-04 12:00 UTC


Downloads this Month Build Status Coverage Status Latest Stable Version License


NEON is a human-readable data serialization language. It is commonly used for configuration files, but could be used in many applications where data is being stored

NEON is very similar to YAML.The main difference is that the NEON supports "entities" (so can be used e.g. to parse phpDoc annotations) and tab characters for indentation. NEON syntax is a little simpler and the parsing is faster.

Documentation can be found on the website.

If you like Nette, please make a donation now. Thank you!

NEON language

Try NEON in sandbox!

Example of NEON code:

# my web application config

	date.timezone: Europe/Prague
	zlib.output_compression: yes  # use gzip

	driver: mysql
	username: root
	password: beruska92

	- Dave
	- Kryten
	- Rimmer


The recommended way to install is via Composer:

composer require nette/neon

It requires PHP version 7.1 and supports PHP up to 7.4.


Nette\Neon\Neon is a static class for encoding and decoding NEON files.

Neon::encode() returns $value encoded into NEON. Flags accepts Neon::BLOCK which formats NEON in multiline format.

use Nette\Neon\Neon;
$neon = Neon::encode($value); // Returns $value encoded in NEON
$neon = Neon::encode($value, Neon::BLOCK); // Returns formatted $value encoded in NEON

Neon::decode() converts given NEON to PHP value:

$value = Neon::decode('hello: world'); // Returns an array ['hello' => 'world']

Both methods throw Nette\Neon\Exception on error.

Editors plugins

Other languages