diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..ebb192078749b9aa1ba1e684c759669c3a143a46
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,58 @@
+project('cJSON', 'c', default_options: ['c_std=c89'])
+version = '1.6.0'
+soversion = '0'
+
+compiler = meson.get_compiler('c')
+
+compiler_flags = []
+
+if (compiler.get_id() == 'clang') or (compiler.get_id() == 'gcc')
+	compiler_flags += [
+		'-pedantic',
+		'-Wall',
+		'-Wextra',
+		'-Werror',
+		'-Wstrict-prototypes',
+		'-Wwrite-strings',
+		'-Wshadow',
+		'-Winit-self',
+		'-Wcast-align',
+		'-Wformat=2',
+		'-Wmissing-prototypes',
+		'-Wstrict-overflow=2',
+		'-Wcast-qual',
+		'-Wundef',
+		'-Wswitch-default',
+		'-Wconversion',
+		'-Wc++-compat',
+		'-fstack-protector-strong',
+		'-Wcomma',
+		'-Wdouble-promotion',
+		'-Wparentheses',
+		'-Wformat-overflow',
+		'-Wunused-macros',
+		'-Wmissing-variable-declarations',
+		'-Wused-but-marked-unused',
+		'-Wswitch-enum'
+	]
+endif
+
+foreach flag : compiler_flags
+	if compiler.has_argument(flag)
+		add_project_arguments(flag, language: 'c')
+	endif
+endforeach
+
+math = compiler.find_library('m', required: false)
+
+cjson = shared_library('cjson', 'cJSON.c', dependencies: math, version: version, soversion: soversion, install: true)
+if get_option('enable_cjson_utils')
+	cjson_utils = shared_library('cjson_utils', 'cJSON_Utils.c', link_with: cjson, version: version, soversion: soversion, install: true)
+endif
+
+if get_option('enable_cjson_tests')
+	cjson_test = executable('cjson_test', 'test.c', link_with: cjson)
+	test('cjson_test', cjson_test)
+endif
+
+subdir('tests')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b6dc6c12d535a0a57d866e483737d5eed6c52b71
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,2 @@
+option('enable_cjson_utils', type: 'boolean', value: true)
+option('enable_cjson_tests', type: 'boolean', value: true)
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..1d8bf602a57064cdfa71acd131e3ef2a79667880
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,58 @@
+if get_option('enable_cjson_tests')
+	unity_flags = []
+
+	if (compiler.get_id() == 'clang') or (compiler.get_id() == 'gcc')
+		unity_flags += [
+			'-Wno-switch-enum',
+			'-Wno-error',
+			'-fvisibility=default',
+			'-fno-sanitize=float-divide-by-zero'
+		]
+	endif
+
+	unity_c_args = []
+	foreach flag : unity_flags
+		if compiler.has_argument(flag)
+			unity_c_args += flag
+		endif
+	endforeach
+
+	unity = library('unity', 'unity/src/unity.c', c_args: unity_c_args)
+	common = library('test_common', 'common.c')
+
+	cjson_tests = [
+		'parse_examples',
+		'parse_number',
+		'parse_hex4',
+		'parse_string',
+		'parse_array',
+		'parse_object',
+		'parse_value',
+		'print_string',
+		'print_number',
+		'print_array',
+		'print_object',
+		'print_value',
+		'misc_tests',
+		'parse_with_opts',
+		'compare_tests'
+	]
+
+	foreach cjson_test : cjson_tests
+		exe = executable(cjson_test, cjson_test + '.c', link_with: [common, cjson, unity])
+		test(cjson_test, exe, workdir: meson.current_source_dir())
+	endforeach
+
+	if get_option('enable_cjson_utils')
+		cjson_utils_tests = [
+			'json_patch_tests',
+			'old_utils_tests',
+			'misc_utils_tests'
+		]
+
+		foreach cjson_utils_test : cjson_utils_tests
+			exe = executable(cjson_utils_test, cjson_utils_test + '.c', link_with: [common, cjson_utils, unity, cjson])
+			test(cjson_utils_test, exe, workdir: meson.current_source_dir())
+		endforeach
+	endif
+endif