diff --git a/Makefile b/Makefile
index f8035f87252c475cf72c290281906698d9b62122..d83c7c953fd3d86074bd80490403120239f05e2e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: docs tests check mypy pylint
+.PHONY: docs tests check mypy pylint black
 
 # generate documentation
 docs:
@@ -9,7 +9,7 @@ tests:
 	python3 -m unittest ${TESTS_FILTER}
 
 # check
-check: mypy pylint
+check: mypy pylint black
 
 # check static typing
 mypy:
@@ -18,3 +18,7 @@ mypy:
 # check code errors
 pylint:
 	pylint --disable=C,R0913,R0903,R0902,R0914,R0912,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 duniterpy/
+
+# format code
+black:
+	black duniterpy
diff --git a/requirements_dev.txt b/requirements_dev.txt
index d175ea349ca5c1465e0bace6c04c2121ac2271b7..1d175d6a316575d8a7e073ea344e37f0bb0ee368 100644
--- a/requirements_dev.txt
+++ b/requirements_dev.txt
@@ -1,5 +1,6 @@
 coveralls
 mypy
 pylint
+black
 sphinx
 sphinx_rtd_theme