Openanzo has a powerful RDF javascript library which has RDF parsing and serialization capabilities.

anzo.rdf.parser.TabulatorParser

An RDF/XML parser ported from Tabulator.
  
var graph = new anzo.rdf.NamedGraph(); // graph into which triples are placed
anzo.rdf.parser.TabulatorParser.parse(rdfXMLString, graph); // parse

anzo.rdf.parser.NTripleParser

An RDF N-Triples parser.
  
var graph = new anzo.rdf.NamedGraph(); // the graph into which the parsed data is placed
anzo.rdf.parser.NTripleParser.parse(nTripleString, graph); // run the parser on the given N-Triple string

anzo.rdf.serializer.NTripleSerializer

An RDF N-Triples serializer.
  
var graph = new anzo.rdf.NamedGraph(); // the graph we want to serialize
// we add a bunch of statements to graph via the add() method
var nTripleString = anzo.rdf.serializer.NTripleSerializer.serialize(graph); // serialize the graph to N-Triples