<p>One option is to use the <a href="http://buildwithcraft.com/docs/plugins/events-reference#tags-onBeforeSaveTag" rel="nofollow">onBeforeSaveTag</a> event to capture the tag before it is saved. You can then use PHP's <code>strtolower</code> to normalize all of your tags.</p>

<p>In a plugin's main file, your <code>init()</code> function should have something like this: </p>

<pre><code>public function init()
{
    craft()-&gt;on('tags.onBeforeSaveTag', function(Event $event) {
        $event-&gt;params['tag']-&gt;title = strtolower($event-&gt;params['tag']-&gt;title);
    });

}
</code></pre>

CC BY-SA 3.0
2015-10-27T16:08:08.623Z
Thanks - wonder if it might just be better using categories so that it is much clearer and there is a wee bit more control over the spelling of the 'tags' we want to use
Cole Henley
CC BY-SA 3.0
2015-10-27T16:15:16.473Z
Sounds like a good option @ColeHenley. Tags are best used when you don't care as much about consistency or organization.
Aaron Berkowitz
CC BY-SA 3.0
2015-10-27T15:27:40.977Z
2015-10-27T15:27:40.977Z
Aaron Berkowitz
<p>At the moment use of Tags seems to be case insensitive.
So, for example, it is possible to tag an article as both 'IT Support' and 'it support'.</p>

<p>Is it at all possible to make the Tags case sensitive?</p>

<tags><case>
Tag case sensitivity
# Tag case sensitivity

(Asked by: username_0 on 2015-10-27)

At the moment use of Tags seems to be case insensitive.
So, for example, it is possible to tag an article as both 'IT Support' and 'it support'.

Is it at all possible to make the Tags case sensitive?

**Tags:** tags, case

---

## 1 answers

### Answer by username_1 on 2015-10-27. Score: 2

One option is to use the onBeforeSaveTag event to capture the tag before it is saved. You can then use PHP's strtolower to normalize all of your tags.
In a plugin's main file, your init() function should have something like this: 
public function init()
{
    craft()->on('tags.onBeforeSaveTag', function(Event $event) {
        $event->params['tag']->title = strtolower($event->params['tag']->title);
    });

}

> **Comments:**
> **username_0**: Thanks - wonder if it might just be better using categories so that it is much clearer and there is a wee bit more control over the spelling of the 'tags' we want to use  
> **username_1**: Sounds like a good option @ColeHenley. Tags are best used when you don't care as much about consistency or organization.  

---

