A highly active and stable palladium catalyst on a g-C3N4 support for direct formic acid synthesis under neutral conditions.