Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Command-line JSON processor
C Bison Shell Other
Failed to load latest commit information.
build Rake task to build website including source dist and binaries.
config Update .gitignore and config/.gitignore
docs Add filename/line functions to jq (fix #753)
m4 BSD sed lacks -r; fix #551
scripts Partial revamp of `scripts/crosscompile`
tests Keywords should be OK as object keys (fix #794)
.gitattributes Remove .gitignore from tarballs.
.gitignore Add --disable-maintainer-mode; make bison optional
.travis.yml .travis.yml: Set sudo false; use containers
AUTHORS Correct @wtlangford's address
COPYING Add a COPYING file with too many words in it.
ChangeLog Remove remnants of `--online-input` option
Dockerfile Adds Dockerfile Add ./configure --enable-all-static instead
NEWS Add ChangeLog and NEWS files
README Check in a pile of Autotools junk, including the configure script. Fix README
builtin.c Fix #793
builtin.h Add callback interface for errors
bytecode.c Further module system revamp (fix #659)
bytecode.h Add `label $name | EXP`; fix `break` Added cross-compilation script to build libjq for iOS.
compile.c Use jv_mem_alloc() in compile.c (fix #771)
compile.h Further module system revamp (fix #659) Add ./configure --enable-all-static instead
exec_stack.h exec_stack.h was not using jv_mem_realloc()
execute.c Print offending object in runtime error messages
inject_errors.c Add error injection library
jq.1.default Add some build instructions for how to install doc dependencies.
jq.1.prebuilt Remove remnants of `--online-input` option
jq.h Add filename/line functions to jq (fix #753)
jq.spec include additional files in jq.spec
jq_parser.h Fold opcode.{c,h} into bytecode.{c,h}
jq_test.c Include filename and lineno in error messages
jv.c Add wrapping and clamping to jv_array_slice
jv.h Print offending object in runtime error messages
jv_alloc.c Add jv_mem_strdup*() and callocs too
jv_alloc.h Add jv_mem_strdup*() and callocs too
jv_aux.c Remove string indexing by string (fix #454)
jv_dtoa.c Detect endianness at configuration with Autoconf AC_C_BIGENDIAN feature
jv_dtoa.h Format more integers as integers, not scientific notation.
jv_file.c Add flags argument to jv_parser_new()
jv_parse.c Fix --stream assertion
jv_print.c Print offending object in runtime error messages
jv_unicode.c Added regex support as per issue #164.
jv_unicode.h Fix various UTF8 parsing bugs.
jv_utf8_tables.h Reject all overlong UTF8 sequences.
lexer.c Add `$__loc__` (fix #740)
lexer.h Add `$__loc__` (fix #740)
lexer.l Add `$__loc__` (fix #740)
libm.h Add cbrt (cube root)
linker.c Include filename and lineno in error messages
linker.h Add `module` directive, `modulemeta` builtin
locfile.c Add `$__loc__` (fix #740)
locfile.h Fix header guards (fix #770)
main.c Report filename:line on runtime errors (fix #752)
opcode_list.h Further module system revamp (fix #659)
parser.c Update parser.c
parser.h Add `$__loc__` (fix #740)
parser.y Keywords should be OK as object keys (fix #794) Add --disable-maintainer-mode; make bison optional
util.c Fix Windows build: util.c
util.h Add mkstemp() for mingw build


jq is a command-line JSON processor.

If you want to learn to use jq, read the documentation at This documentation is generated from the docs/ folder of this repository. You can also try it online at

If you want to hack on jq, feel free, but be warned that its internals are not well-documented at the moment. Bring a hard hat and a shovel. Also, read the wiki:

Source tarball and built executable releases can be found on the homepage and on the github release page,

If you're building directly from the latest git, you'll need flex, bison (3.0 or newer), libtool, make, and autoconf installed. To get regexp support you'll also need to install Oniguruma (note that jq's tests require regexp support to pass). To build, run:

autoreconf -i   # if building from git
make -j8
make check

To build without bison or flex, add --disable-maintainer-mode to the ./configure invocation:

./configure --disable-maintainer-mode

(Developers must not use --disable-maintainer-mode, not when making changes to the jq parser and/or lexer.)

To build a statically linked version of jq, run:

make LDFLAGS=-all-static

After make finishes, you'll be able to use ./jq. You can also install it using:

sudo make install

If you're not using the latest git version but instead building a released tarball (available on the website), then you won't need to run autoreconf (and shouldn't), and you won't need flex or bison.

To cross-compile for OS X and Windows, see docs/Rakefile's build task and scripts/crosscompile. You'll need a cross-compilation environment, such as Mingw for cross-compiling for Windows.

Cross-compilation requires a clean workspace, then:

# git clean ...
autoreconf -i
make distclean
scripts/crosscompile <name-of-build> <configure-options>

Use the --host= and --target= ./configure options to select a cross-compilation environment. See also the wiki.

Send questions to or to the #jq channel ( on Freenode (

Something went wrong with that request. Please try again.