N3
Notation3 (N3) is a compact, human-readable text serialization for RDF data that also extends RDF into a logic language. It was designed by Tim Berners-Lee (with Dan Connolly) starting around 2000, and captured as the W3C Team Submission "Notation3 (N3): A readable RDF syntax" in 2011. Its stated goal was two-fold: give the RDF triple model a syntax far more legible than the original XML encoding, and add just enough logical machinery to write rules and reason over web data. N3 is a strict superset of RDF's triple model — every RDF graph can be written in N3 — but it goes beyond plain RDF serialization.
Syntactically, N3 shares the core it inspired: @prefix namespace declarations, subject predicate object . triples, the ; and , shortcuts for shared subjects and predicates, a as an alias for rdf:type, [...] blank-node syntax, and (...) collections built on rdf:first/rdf:rest. The RDF-only subset of N3 is essentially Turtle, which was standardized separately as a W3C Recommendation and is today the mainstream way to write RDF text; N-Triples (N-Triples) is a further-simplified line-based subset. What distinguishes N3 proper are its logic extensions: graphs can be quoted as first-class objects inside { ... } formulae (enabling statements about statements), variables can be universally or existentially quantified (@forAll, @forSome, or ?x), and rules are written with the implication operators => and <=. A library of built-in predicates (string, math, list, and graph operations) lets a reasoner compute and infer new triples; these were catalogued by the later W3C N3 Community Group (2023), which also produced a refreshed grammar and semantics.
In the graph-data and format-conversion world, N3 sits in the RDF family alongside Turtle, TriG, RDF/XML, JSON-LD, N-Triples, N-Quads and OWL, and its rule layer overlaps conceptually with RDF-based ontology and inference stacks. Tooling is centered on Semantic Web engines: RDFLib (Python) parses and serializes N3, Jena/RIOT and dotNetRDF handle the RDF-compatible subset, and the EYE reasoner and cwm are the classic engines that execute N3 rules.
Its strengths are readability and the unusual ability to carry both data and executable rules in one file, useful for lightweight reasoning, data validation, and self-describing documents. The limitations are equally real: N3 never advanced past Team Submission / Community Group status, so it is far less widely supported than Turtle; the full language (quoting, quantification, built-ins) is complex and implemented consistently only by a handful of reasoners; and semantics around quoted formulae have historically been under-specified, motivating the later formalization efforts.
Alternative Names: N3
| Feature | Notation3 (N3) |
|---|---|
| Multiple Graphs per Document | |
| Nodes | |
| Undirected Edges | |
| Directed Edges | |
| Hyperedges | |
| Mixed-directionality Edges | |
| Parallel Edges | |
| Self-loops | |
| Edges on Edges | |
| Nested Graphs in Nodes | |
| Nested Graphs in Edges | |
| Nested Graphs in Graphs | |
| Node Labels | |
| Edge Labels | |
| Attributes on Nodes | |
| Attributes on Edges | |
| Attributes on Graphs | |
| Typed Edges | |
Tools(Read & Write)
Read-only Tools
Frequently Asked Questions
What is a Notation3 (N3) file?
A Notation3 (N3) file stores a graph — its nodes, edges and attributes — in the Notation3 (N3) format (also: N3). See the feature table above for what it supports.
How do I open a Notation3 (N3) file?
Open it in a graph tool that supports Notation3 (N3), or convert it to a format your tool reads. With GraphInOut you can convert Notation3 (N3) to GraphML, DOT, Connected JSON and more, right in your browser.
How do I convert a Notation3 (N3) file to another format?
Use the Convert from Notation3 (N3) link above: upload or paste your Notation3 (N3) file (input preset to Notation3 (N3)), choose a target format and download the result — free, no install.
