Is it possible to convert every letters in a specific field to uppercase?

I would like to have the addresses of my contacts on Civi written in uppercase (for postal service purposes).

The ideal scenario would be to force that field to be uppercase. But also converting it after the record is created would be sufficient.

Thank you.

3 Answers 3


I don't think that is possible out of the box, but it would be an easy extension to write. You could use hook_civicrm_pre, look for edit/create operations on Addresses and change the relevant fields to uppercase.


You can connect to USPS Web Tools which will do this standardization. Go to administer > localization > address settings. Signup https://www.usps.com/business/web-tools-apis/welcome.htm and you can get it working right away. That will take care of when create / update happen.

For existing records you can use Cividesk Normalize and it allows you to perform normalization based on a contact ID range: https://civicrm.org/extensions/cividesk-normalize.

  • Hello Andy. Thank you for your answer. You give me hope! Jokes apart: I'm trying to enable USPS Web Tools. I've registered and entered the ID they gave me and the URL (both production.shippingapis.com/ShippingAPI.dll and secure.shippingapis.com/ShippingAPI.dll). But nothing happens. If I create a new contact with a bad formatted address...nothing happens and the bad address saves. What am I missing? I've tried both production URLs
    – Marco
    Sep 9, 2019 at 10:37

You may use CSS.   text-transform: uppercase;

  • That would work when viewing the contact summary page but it sounds like Marco needs it stored in the database as uppercase or at least stored in postal-friendly format.
    – Demerit
    Sep 7, 2019 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.