diff --git a/warehouse/config.py b/warehouse/config.py
index <HASH>..<HASH> 100644
--- a/warehouse/config.py
+++ b/warehouse/config.py
@@ -235,6 +235,7 @@ def configure(settings=None):
 
     # We'll want to configure some filters for Jinja2 as well.
     filters = config.get_settings().setdefault("jinja2.filters", {})
+    filters.setdefault("json", "warehouse.filters:tojson")
     filters.setdefault("readme", "warehouse.filters:readme_renderer")
     filters.setdefault("shorten_number", "warehouse.filters:shorten_number")
 
diff --git a/warehouse/filters.py b/warehouse/filters.py
index <HASH>..<HASH> 100644
--- a/warehouse/filters.py
+++ b/warehouse/filters.py
@@ -12,6 +12,7 @@
 
 import binascii
 import hmac
+import json
 import urllib.parse
 
 import html5lib
@@ -85,3 +86,7 @@ def shorten_number(value):
             return "{:.3g}{}".format(magnitude, symbol)
 
     return str(value)
+
+
+def tojson(value):
+    return json.dumps(value, sort_keys=True, separators=(",", ":"))
Add a filter to convert to json